<?php

namespace IDock\Insurance\CHAC\Request;

use IDock\Http\RequestFormat;
use IDock\Insurance\CHAC\Response\K1PolicyStatusResponse;
use IDock\Visitor\PolicyInfoVisitor;

class K1PolicyStatusRequest extends AllCHACRequest
{
    protected $route = 'new/vhl/policyStatus';

    protected $response = K1PolicyStatusResponse::class;

    protected $urlTip = '保单状态';

    protected $format = RequestFormat::JSON;

    /*** @var  PolicyInfoVisitor $visitor */
    protected $visitor;

    public function generate(): array
    {
        return [
            'requestHead' => [
                'requestType' => '',
                'userName' => $this->visitor->argc['userName'] ?? '',
                'passWord' => $this->visitor->argc['passWord'] ?? '',
                'partnerCode' => $this->visitor->argc['partnerCode'] ?? '',
                'queryId' => $this->getRequestId(),
            ],
            'requestBody' => [
                'orderNumber' => $this->visitor->policyNo,
            ]
        ];
    }
}
